home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Whiteline: delta
/
whiteline CD Series - delta.iso
/
tools
/
utils
/
twtcp122
/
pktdrv
/
pktdlink
/
lancexb.s
< prev
next >
Wrap
Text File
|
1995-11-25
|
2KB
|
99 lines
;/********************************************************************/
;/* */
;/* Packet driver for D-LINK ethernet controller */
;/* */
;/* Copyleft by P. Mayer, 1992 TU-Vienna IAEE */
;/* All rights reserved */
;/* */
;/********************************************************************/
.text
.super
xdef lance_interrupt
xdef lance_200interrupt
xdef old200
xdef clock
xref new_stack
xref old_stack
xref ihandler
xref locked200
;lance_200interrupt:
; tst.b locked200
; bne.b no200handler2
; movem.l d0-d7/a0-a6,-(a7)
; move.l a7,old_stack
; lea new_stack,a7
; movea.l ihandler,a0
; beq no200handler
; jsr (a0)
;no200handler:
; movea.l old_stack,a7
; movem.l (a7)+,d0-d7/a0-a6
;no200handler2:
; move.l old200, -(a7)
; rts
OLD_STACK: dc.l 0
.bss
.even
DS.W 512
NEW_STACK:
DS.W 10
.text
.DC.L 'XBRADLNK'
old200: dc.l 0
lance_200interrupt:
; test semaphore
tst.b locked200
bne H200_EXIT ; inet busy -> jump
or.b #$80,locked200
move (a7),savesr
move.l 2(a7),savepc
move.l #myrout,2(a7)
move.l d0,-(a7)
move savesr,d0
and #$ffff,d0
or #$2000,d0
move d0,4(a7)
move.l (a7)+,d0
bra.s EXIT2
H200_EXIT:
and.b #$7f,locked200
EXIT2: move.l old200,-(a7)
rts ; jump to old handler
myrout:
move.l a7,OLD_STACK
movea.l #NEW_STACK,a7 ; install new stack
movem.l d0-a6,-(a7) ;
tst.l ihandler
beq no200handler
movea.l ihandler,a0
jsr (a0)
no200handler:
movem.l (a7)+,d0-a6
move.l OLD_STACK,a7
move.l savepc,-(a7)
move savesr,-(a7)
clr.b locked200
rte
clock: move.l $4ba,d0 ;
rts
savepc: dc.l 0
savesr: dc.l 0
locked200: dc.w 0